﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace ZGameFramework
{ 
    public class Singleton<T> where T :class, new()
    {
        static T instance;
        public static T Instance
        {
            get {
                if (null == instance)
                {
                    instance = new T();
                }
                return instance;
            }
        }

    }
}
